<%-- 
    Document   : anadirAsoc
    Created on : 23-mar-2009, 23:27:33
    Author     : oracle
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es-es" lang="es-es" dir="ltr">
<head>
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  <meta name="robots" content="index, follow" />
  <meta name="keywords" content="joomla, Joomla" />
  <meta name="description" content="Joomla! - el motor de portales dinámicos y sistema de administración de contenidos" />
  <meta name="generator" content="Joomla! 1.5 - Open Source Content Management" />
  <title>Bancosol - Administración</title>
  <link href="/joomla/administrator/templates/khepri/favicon.ico" rel="shortcut icon" type="image/x-icon" />

<link rel="stylesheet" href="CSS/system.css" type="text/css" />
<link rel="stylesheet" href="CSS/base.css" type="text/css" />
<link href="CSS/login.css" rel="stylesheet" type="text/css" />
<script src="js/validacion.js" type="text/javascript"></script>
<script src="js/envios.js" type="text/javascript"></script>

<!--[if IE 7]>
<link href="templates/khepri/css/ie7.css" rel="stylesheet" type="text/css" />
<![endif]-->

<!--[if lte IE 6]>
<link href="templates/khepri/css/ie6.css" rel="stylesheet" type="text/css" />
<![endif]-->

	<link rel="stylesheet" type="text/css" href="CSS/rounded.css" />

<!-- Script para bloquear el enter-->
<script>
    function stopEnter(e){
        var e = (e) ? e : ((event) ? event : null);
        var node = (e.target) ? e.target : ((e.srcElement) ? e.srcElement : null);
        if ((e.keyCode == 13) && (node.type == "text"))
            return false;
    }
    document.onkeypress = stopEnter;
</script>

</head>
<% String usuario;
                       String cif;
                    if (request.getSession().getAttribute("usuario") != null){
                            usuario = (String) request.getSession().getAttribute("usuario");
                            cif = (String) request.getSession().getAttribute("cif");
                    } else {
                           usuario = "";
                           cif = "";
                    %>
                           <script language="JavaScript"> window.location.href="index.jsp"</script>
                       <%}
                    %>
<%if (usuario.equalsIgnoreCase("admin")){%>
    <body onload="anadirAsocSelect('<%=cif.toUpperCase()%>')">
<%} else {%>
    <body>
<%}%>
	<div id="border-top" class="h_purple">
		<div>
			<div>
                <span class="title">
                    
                    <%=usuario.toUpperCase()%>
                </span>
			</div>
		</div>
	</div>

	<div id="content-box">
		<div class="padding">
			<div id="element-box" class="menu">
				<div id="globalheader" class="home">
                    <!--googleoff: all-->
                    <ul id="globalnav">
                        <li id="gn-bancosol"><a href="">Bancosol</a></li>
                        <li id="gn-inicio"><a href="home.jsp">Inicio</a></li>
                        <% if (request.getSession().getAttribute("usuario") == null){%>
                            <script language="JavaScript"> window.location.href="index.jsp"</script>
                        <%}%>
                        <li id="gn-gestAsoc"><a href="gestAsoc.jsp">Gestión Asociaciones</a></li>
                        <li id="gn-gestUsu"><a class="selected" href="gestUsu.jsp">Gestión usuarios</a></li>
                        <li id="gn-informes"><a href="informes.jsp">Informes</a></li>
                        <li id="gn-salir"><a href="index.jsp">Salir</a></li>
                    </ul>
                    <!--googleon: all-->
                    <div id="globalsearchAdmin">
                        <form name="busqueda" action="servlets/ConsUsuYFam" method="POST" class="search" id="busqueda">
                            <div>
                                <label for="sp-searchtext">
                                    <span class="prettyplaceholder">Buscar</span>
                                    <input type="search" name="buscar" id="buscar" class="g-prettysearch applesearch" accesskey="s">
                                </label>
                            </div>
                        </form>                        
                    </div>
                </div>
                <div class="center">
                    <form name="anadeUsu" method="POST" action="servlets/AnadirUsu" id="anadeUsu">
                        <table>
                            <tr>
                                <td>
                                    <table cellpadding="5" border="1" bgcolor="#B177E2">
                                        <tr>
                                            <td style="border-bottom:hidden; border-right:hidden"><label for="modlgn_username">D.N.I./Pasaporte</label> (*)</td>
                                            <td style="border-bottom:hidden"><input name="dni" id="dni" type="text" class="inputbox" size="15" onkeyup="if(event.keyCode == 13){comprobarUsuario(document.getElementById('dni').value, '<%=usuario.toUpperCase()%>')}"/></td>
                                        </tr>
                                        <tr>
                                            <td style="border-bottom:hidden; border-right:hidden"><label for="modlgn_username">Número expediente</label> (*)</td>
                                            <td style="border-bottom:hidden"><input name="nExp" id="nExp" type="text" class="inputbox" size="15" onkeypress="if(event.keyCode == 13){}" disabled="disabled"/></td>
                                        </tr>
                                         <tr>
                                            <td style="border-bottom:hidden; border-right:hidden"><label for="modlgn_username">Nombre</label> (*)</td>
                                            <td style="border-bottom:hidden"><input name="nombre" id="nombre" type="text" class="inputbox" size="15" onkeypress="if(event.keyCode == 13){}" disabled="disabled"/></td>
                                        </tr>
                                        <tr>
                                            <td style="border-bottom:hidden; border-right:hidden"><label for="modlgn_username">Apellidos</label> (*)</td>
                                            <td style="border-bottom:hidden"><input name="apellidos" id="apellidos" type="text" class="inputbox" size="15" onkeypress="if(event.keyCode == 13){}" disabled="disabled"/></td>
                                        </tr>
                                        <tr>
                                            <td style="border-bottom:hidden; border-right:hidden"><label for="modlgn_username">Tarjeta residente</label></td>
                                            <td style="border-bottom:hidden"><input name="tarjResi" id="tarjResi" type="text" class="inputbox" size="15" onkeypress="if(event.keyCode == 13){}" disabled="disabled"/></td>
                                        </tr>
                                        <tr>
                                            <td style="border-bottom:hidden; border-right:hidden"><label for="modlgn_username">Nacionalidad</label> (*)</td>
                                            <td style="border-bottom:hidden"><input name="nacionalidad" id="nacionalidad" type="text" class="inputbox" onkeypress="if(event.keyCode == 13){}" size="15" disabled="disabled"/></td>
                                        </tr>
                                        <tr>
                                            <td style="border-bottom:hidden; border-right:hidden"><label for="modlgn_passwd">Fecha nacimiento</label> (*)</td>
                                            <td style="border-bottom:hidden"><input name="fechaNac" id="fechaNac" type="text" class="inputbox" size="15" onkeypress="if(event.keyCode == 13){}" disabled="disabled"/></td>
                                        </tr>
                                        <tr>
                                            <td style="border-bottom:hidden; border-right:hidden"><label for="modlgn_username">Tipo vía</label> (*)</td>
                                            <td style="border-bottom:hidden"><input name="tipoVia" id="tipoVia" type="text" class="inputbox" size="15" onkeypress="if(event.keyCode == 13){}" disabled="disabled"/></td>
                                        </tr>
                                        <tr>
                                            <td style="border-bottom:hidden; border-right:hidden"><label for="modlgn_username">Nombre vía</label> (*)</td>
                                            <td style="border-bottom:hidden"><input name="nombreVia" id="nombreVia" type="text" class="inputbox" size="15" onkeypress="if(event.keyCode == 13){}" disabled="disabled"/></td>
                                        </tr>
                                        <tr>
                                            <td style="border-bottom:hidden; border-right:hidden"><label for="modlgn_username">Número vía</label> (*)</td>
                                            <td style="border-bottom:hidden"><input name="numeroVia" id="numeroVia" type="text" class="inputbox" size="15" onkeypress="if(event.keyCode == 13){}" disabled="disabled"/></td>
                                        </tr>
                                        <tr>
                                            <td style="border-bottom:hidden; border-right:hidden"><label for="modlgn_username">Ciudad</label> (*)</td>
                                            <td style="border-bottom:hidden"><input name="ciudad" id="ciudad" type="text" class="inputbox" size="15" onkeypress="if(event.keyCode == 13){}" disabled="disabled"/></td>
                                        </tr>
                                        <tr>
                                            <td style="border-bottom:hidden; border-right:hidden"><label for="modlgn_username">Provincia</label> (*)</td>
                                            <td style="border-bottom:hidden"><input name="provincia" id="provincia" type="text" class="inputbox" size="15" onkeypress="if(event.keyCode == 13){}" disabled="disabled"/></td>
                                        </tr>
                                        <tr>
                                            <td style="border-right:hidden"><label for="modlgn_username">Código postal</label> (*)</td>
                                            <td><input name="cp" id="cp" type="text" class="inputbox" size="15" onkeypress="if(event.keyCode == 13){}" disabled="disabled"/></td>
                                        </tr>
                                        <% if (request.getSession().getAttribute("usuario").equals("admin")) {%>
                                        <tr id="fAsoc">
                                            <td style="border-right:hidden; border-top:hidden"><label id="lAsoc" for="modlgn_username">CIF asociación</label> (*)</td>
                                            <td style="border-top:hidden"><select size="1" name="asoc" id="asoc" class="inputbox" size="20" disabled="disabled"/></td>
                                        </tr>
                                        <%}%>
                                    </table>
                                </td>
                                <td valign="top">
                                    <img src="images/accepted_48.png" alt="ImValidar" title="Comprobar usuario" onclick="comprobarUsuario(document.getElementById('dni').value, '<%=usuario.toUpperCase()%>')" />
                                    <div id="fam" style="display:none"><img src="images/users_two_48.png" alt="Añadir Familia" title="Añadir familiares" onclick="abrirPaginaFam()"/></div>
                                </td>
                                <td width="40%">
                                    <div id="nombreAsociacion"></div>
                                </td>
                            </tr>                               
                        </table>                     
                        <div class="button_holder">
                            <div class="button1">
                                <div class="next">
                                    <a onclick="validaUsu(document.getElementById('anadeUsu'));">
                                        Añadir
                                    </a>
                                </div>
                            </div>
                       </div>
                    </form>
                    Los campos con (*) son obligatorios.
                </div>

			</div>
			<noscript>
				¡Advertencia! Debes tener JavaScript habilitado para que la administración funcione correctamente			</noscript>

			<div class="clr"></div>
		</div>
	</div>
    </div>
	<div id="border-bottom"><div><div></div></div>
</div>
<div id="footer">
	<p id="copyright" class="copyright">
		<a href="http://www.bancosol.es" target="_blank">Bancosol</a>
		- Banco de Alimentos de la Costa del Sol
	</p>

</div>
</body>
</html>
